﻿namespace MagicWatering.UI
{
    using System;

    using MagicWatering.Scheduler;
    using MagicWatering.Scheduler.Interfaces;

    internal class FeedbackService : IFeedbackService
    {
        #region Instance fields

        private readonly MainControlPanel s_Panel;

        #endregion

        #region Constructors and Finalizers

        public FeedbackService(MainControlPanel panel)
        {
            s_Panel = panel;
        }

        #endregion

        #region Public Methods

        public void Log(Constants.FeedbackClass feedbackClass, string messageId, params string[] values)
        {
            string message = string.Format("{0} \t {1} \t {2}", DateTime.Now, feedbackClass, messageId);
            s_Panel.AddMessage(message);
        }

        #endregion
    }
}